package com.xinqi.modules.course.course.enums.student;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.xinqi.common.base.annotations.Describe;
import com.xinqi.common.base.enums.BaseEnum;
import lombok.Getter;

/**
 * 课程置顶状态状态
 *
 * @author wenjie
 * @date 2023/3/8
 */
@Describe("课程置顶状态")
public enum StudentUpStatusEnum implements BaseEnum {
    NO_OPS("NO_OPS", "不置顶"),

    UP("UP", "置顶");

    @Getter(onMethod_ = {@JsonValue})
    private final String code;

    @Getter
    private final String describe;

    StudentUpStatusEnum(String code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    @JsonCreator
    public static StudentUpStatusEnum of(String code) {
        return BaseEnum.of(StudentUpStatusEnum.class, code);
    }
}
